package com.ethink.warehouse.facade.impl;

import com.ethink.warehouse.api.info.MateInventoryOrderMoreInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.MateInventoryOrderFacade;
import com.ethink.warehouse.api.info.MateInventoryOrderInfo;
import com.ethink.warehouse.api.request.MateInventoryOrderAddRequest;
import com.ethink.warehouse.api.request.MateInventoryOrderQueryRequest;
import com.ethink.warehouse.api.request.MateInventoryOrderUpdateRequest;
import com.ethink.warehouse.api.response.MateInventoryOrderAddResponse;
import com.ethink.warehouse.api.response.MateInventoryOrderDeleteResponse;
import com.ethink.warehouse.api.response.MateInventoryOrderUpdateResponse;
import com.ethink.warehouse.service.MateInventoryOrderService;
import java.util.List;

/**
 * 入库/出库单 Facade接口实现
 *
 * @author default
 * @date 2022-12-15
 */
@RestController
@Slf4j
@RequestMapping("warehouse-service/facade/v1/mateInventoryOrder")
public class MateInventoryOrderFacadeImpl implements MateInventoryOrderFacade {

    @Autowired
    private MateInventoryOrderService mateInventoryOrderService;

    @Override
    public Page<MateInventoryOrderMoreInfo> queryMateInventoryOrder(MateInventoryOrderQueryRequest request) {
        return mateInventoryOrderService.queryMateInventoryOrder(request);
    }

    @Override
    public MateInventoryOrderInfo getMateInventoryOrderById(Long mateInventoryOrderId) {
        return mateInventoryOrderService.getMateInventoryOrderById(mateInventoryOrderId);
    }

    @Override
    public List<MateInventoryOrderMoreInfo> listMateInventoryOrder(MateInventoryOrderQueryRequest request) {
        return mateInventoryOrderService.listMateInventoryOrder(request);
    }

    @Override
    public MateInventoryOrderAddResponse addMateInventoryOrder(MateInventoryOrderAddRequest request) {
        return mateInventoryOrderService.addMateInventoryOrder(request);
    }

    @Override
    public MateInventoryOrderUpdateResponse updateMateInventoryOrder(MateInventoryOrderUpdateRequest request) {
        return mateInventoryOrderService.updateMateInventoryOrder(request);
    }

    @Override
    public MateInventoryOrderDeleteResponse deleteMateInventoryOrder(Long mateInventoryOrderId) {
        return mateInventoryOrderService.deleteMateInventoryOrder(mateInventoryOrderId);
    }

}